package business.global.pk.ddz;

import com.ddm.server.common.CommLogD;
import com.ddm.server.common.utils.Txt2Utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/*
 * 资阳跑得快 配置文件
 * @author zaf
 * */
public class DDZConfigMgr {
    public static final String fileName = "DDZConfig.txt";
    public static final String filePath = "conf/";
    private Map<String, String> configMap = new HashMap<String, String>();
    protected int God_Card;
    protected ArrayList<Integer> Private_Card1;
    protected ArrayList<Integer> Private_Card2;
    protected ArrayList<Integer> Private_Card3;
    private List<Integer> hold_Card; //底牌


    public DDZConfigMgr() {
        try {
            this.configMap = Txt2Utils.txt2Map(filePath, fileName, "GBK");
            this.God_Card = Integer.valueOf(this.configMap.get("God_Card"));
            this.Private_Card1 = Txt2Utils.String2ListInteger(this.configMap.get("Private_Card1"));
            this.Private_Card2 = Txt2Utils.String2ListInteger(this.configMap.get("Private_Card2"));
            this.Private_Card3 = Txt2Utils.String2ListInteger(this.configMap.get("Private_Card3"));
            this.hold_Card = Txt2Utils.String2ListInteger(this.configMap.get("hold_Card"));
        } catch (Exception e) {
            // TODO: handle exception
            CommLogD.error("PDKConfigMgr e.toMsg=" + e.toString());
        }
    }

    /**
     * @return god_Card
     */
    public boolean isGodCard() {
        return God_Card == 1;
    }

    /**
     * @return private_Card1
     */
    public ArrayList<Integer> getPrivate_Card1() {
        return Private_Card1;
    }

    /**
     * @return private_Card2
     */
    public ArrayList<Integer> getPrivate_Card2() {
        return Private_Card2;
    }

    /**
     * @return private_Card2
     */
    public ArrayList<Integer> getPrivate_Card3() {
        return Private_Card3;
    }


    public List<Integer> getHoldCard() {
        return hold_Card;
    }
}
